package com.system.weirdor.search.service.impl;

import com.system.weirdor.search.index.EsBlog;
import com.system.weirdor.search.repository.EsBlogRepository;
import com.system.weirdor.search.service.EsBlogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class EsBlogServiceImpl implements EsBlogService {

    @Autowired
    EsBlogRepository esBlogRepository;
    @Override
    public void index(EsBlog list) {
        if(list==null){
            return;
        }
        esBlogRepository.save(list);
    }

    @Override
    public EsBlog save(EsBlog esBlog) {

        return  esBlogRepository.save(esBlog);
    }

}
